package com.walker.taogong.hibernate;

import org.hibernate.SessionFactory;

/**
 * Provides a session factory for Hibernate.
 * <p>
 * Using this approach, the com.harmanbecker.anaconda.core bundle does not 
 * depend on the bundles providing configuration input for Hibernate (POJO
 * classes and mappings).
 * 
 * @author Alex Wei
 *
 */
public interface SessionFactoryProvider
{
    /**
     * Returns a Hibernate session factory.
     * @return  session factory.
     */
    SessionFactory getSessionFactory();
    
    /**
     * Gets the Hibernate SQL dialect supported by the session factory.
     * @return  SQL dialect
     */
    String getDialect();
    
    /**
     * Gets the Hibernate SQL dialect supported by the session factory.
     * @return  SQL dialect
     */
    boolean isUpdated();
}
